import { IFeidaoAiBrowserComponent } from '@dfeidao/atom-web/interfaces';
import get from '@dfeidao/atom-web/local/get';
import direct from '@dfeidao/atom-web/url/direct-to';

export default async function a013(fd: IFeidaoAiBrowserComponent, args: { currentTarget: HTMLElement }) {
	// 点击通知消息、工单、任务跳转
	const data = JSON.parse(args.currentTarget.getAttribute('data-id'));
	const flag = args.currentTarget.getAttribute('flag');
	console.log(data);
	console.log(flag);
	const param_no = data.param_no;
	const post_name = get(fd, 'post_name');
	// const msgtemplid = data.msgtemplid;// todo
	// // console.log(msgtemplid);
	if (flag === 'tongji') {
		// direct('./', { param_no });
	} else if (flag === 'gongdan') {
		if (post_name === '总经理' || post_name === '部门经理') {
			direct('./information-desk.html', { param_no });
		} else {
			direct('./project-desk.html', { param_no, flag });
		}
	} else if (flag === 'renwu') {
		// direct('./', { param_no });
	}
}
